package com.xy.biz.xd.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.CodeEnum;

/**
 * @author Greekn Zhang
 * @date 2021/12/9 16:51
 * @description
 */
public enum DocumentReleaseStatusEnum implements CodeEnum {

    RELEASE(0, "放行"),
    OVER_TIME(1, "过时"),
    OBSOLETE(2, "作废");

    private int code;
    private String name;

    DocumentReleaseStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<Integer, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
